
#ifndef __SAFEWALL_BASE_H__
#define __SAFEWALL_BASE_H__

#include <ntifs.h>

EXTERN_C UNICODE_STRING Ntdll_x86;
EXTERN_C UNICODE_STRING Ntdll_x64;
EXTERN_C UNICODE_STRING Kernel32_x86;
EXTERN_C UNICODE_STRING Kernel32_x64;
EXTERN_C UNICODE_STRING KernelBase_x86;
EXTERN_C UNICODE_STRING KernelBase_x64;

EXTERN_C ANSI_STRING LdrLoadDllRoutineName;
EXTERN_C ANSI_STRING LdrLoadLibraryRoutineName;
EXTERN_C WCHAR gSoftPath[260];

typedef PVOID(NTAPI* PFN_PsGetProcessWow64Process)(IN PEPROCESS);
EXTERN_C PFN_PsGetProcessWow64Process PsGetProcessWow64Process;


void InitBase();

void UninitBase();

PVOID NTAPI RtlxFindExportedRoutineByName(
    _In_ PVOID DllBase,
    _In_ PANSI_STRING ExportName);

PVOID MdlMapMemory(OUT PMDL* mdl, IN PVOID tagAddress, IN ULONG mapSize, IN MODE preMode);
VOID MdlUnMapMemory(IN PMDL mdl, IN PVOID mapBase);


#endif